// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import iView from 'iview';
import nodata from './components/common/nodata.vue'
import 'iview/dist/styles/iview.css';
 import mavonEditor from 'mavon-editor'
    import 'mavon-editor/dist/css/index.css'
    // use
    Vue.use(mavonEditor)
Vue.config.productionTip = false
Vue.use(iView);
Vue.use(nodata)
Vue.component('nodata', nodata)
/* eslint-disable no-new */
Vue.prototype.$stringToArray = (s) => {
	var ss = s.split(",");// 在每个逗号(,)处进行分解  ["abc", "abcd", "aaa"]
	return ss
}
Vue.prototype.$randomString = (e) => {  
  e = e || 32;
  var t = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",
  a = t.length,
  n = "";
  for (var i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a));
  return n
}
Vue.prototype.$TimeStampToTime = (timeStamp) => {
	  var date = new Date(timeStamp);
	  var YY = date.getFullYear() + '-';
	  var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
	  var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
	  var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
	  var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
	  var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
	  return YY + MM + DD +" "+hh + mm + ss;
	},
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
